import request from '@/utils/request'

//运费模板列表
export function getfreightlist(page,data) {
  return request({
    url: '/shop/freight/temp/list?page=' + page + '&size=10' ,
    method: 'post',
    data
  })
}
//add
export function savedistribution(data) {
  return request({
    url: '/shop/distribution/save',
    method: 'post',
    data
  })
}

//detail
export function  getdistribution(data) {
  return request({
    url: '/shop/distribution/read?store_id='+data.store_id,
    method: 'get',
  })
}



export function getJurisdiction(data){
  return request({
    url: '/shop/distribution/getJurisdiction?address='+data.address,
    method: 'get',
    data
  });
};

//update
export function editfreight(data) {
  return request({
    url: '/shop/freight/temp/' + data.id,
    method: 'put',
    data
  })
}
// delete
export function delfreight(data) {
  return request({
    url: '/shop/freight/temp/' + data.id,
    method: 'delete',
    data
  })
}


//快递

export function getexpress(){
  return request({
    url: '/shop/freight/express',
    method: 'get'
  });
};
